package com.gdit.zax.dao;

import java.util.ArrayList;
import com.gdit.zax.entitys.AddVideo;
import com.gdit.zax.entitys.BaseEntity;
import com.gdit.zax.entitys.Comment;
import com.gdit.zax.entitys.Course;
import com.gdit.zax.entitys.CourseSee;
import com.gdit.zax.entitys.Section;
import com.gdit.zax.entitys.VideoALL;
import com.gdit.zax.entitys.VideoInfo;

public interface VideoDao {
	public boolean addVideo(AddVideo info); 
	
	public VideoALL getVideoAllInfo(int vid); 
	
	public VideoInfo getvideoinfo(int vid);
	public VideoInfo getvideoinfobyname(String vname);
	public boolean delVideo (int vid);
	public ArrayList<VideoInfo> listvideos (int teacherid,int page,int onepagecount);
	public ArrayList<VideoInfo> listvideos (int page,int onepagecount);
	public ArrayList<VideoALL> listAllvideo (int teacherid,int page,int onepagecount);
	public ArrayList<VideoALL> listAllvideo (int page,int onepagecount);
	
	public ArrayList<VideoALL> listvideobyhot (int page,int onepagecount);//获取热门视频 //播放记录
	public ArrayList<VideoALL> listvideobynew (int page,int onepagecount);//获取新视频
	public ArrayList<VideoALL> listvideobyrecomment (int page,int onepagecount);//获取推荐视频
	
	public ArrayList<CourseSee> listCoursebyhot (int page,int onepagecount);//获取热门视频 //播放记录
	public ArrayList<CourseSee> listCoursebynew (int page,int onepagecount);//获取新视频
	public ArrayList<CourseSee> listCoursebyrecomment (int page,int onepagecount);//获取推荐视频
	public ArrayList<CourseSee> listCoursebyrecomment (int uid,int page,int onepagecount);//获取为我推荐的视频

	
	//获取视频章节
	public ArrayList<Section> getAllSection(int courseid);//需要联动,暂不使用
	public ArrayList<Section> getAllSectionByUser(int uid);
	public Section getSectionByName(String name);
	public Section getSectionById(int sid);
	
	
	//获取视频章节
	public ArrayList<VideoInfo> getAllVideo(int sectionid);
	//根据课程获取视频列表
	public ArrayList<VideoALL> listAllVideobycourse(int cid);
	//根据课程获取视频列表
	public ArrayList<VideoALL> listAllVideobycourse(int cid,int page,int onepagecount);
	
	
	//获取所有视频分类
	public ArrayList<BaseEntity> getAllVideotype();
	
	//增加视频课程分类(不管是否存在)
	public BaseEntity addVideoTypeWhetherExist(String name);
	
	//获取视频的评论
	public ArrayList<Comment> listComment(int vid,int page,int onepagecount);
	//获取所有的评论
	public ArrayList<Comment> listAllComment(int page,int onepagecount);
	
	//修改视频资料
	public boolean editVideoInfo (VideoInfo info);
}
